<?php  
	header( "Pragma: public" );  
	header( "Expires: 0" ); // set expiration time  
	header( "Cache-Component: must-revalidate, post-check=0, pre-check=0" );  
	header("Content-type:application/vnd.ms-excel"); 
	$fname=$filename;
	$filename=rawurldecode($filename);
	$filename=iconv("UTF-8","gb2312//IGNORE",$filename);
	header( 'Content-Disposition: attachment; filename="'.$filename.'"' );
	header( 'Content-Transfer-Encoding: binary' );
?> 
<html xmlns:x="urn:schemas-microsoft-com:office:excel">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <!--[if gte mso 9]>
<xml>
<x:ExcelWorkbook>
	<x:ExcelWorksheets> 
		<x:ExcelWorksheet> 
			<x:Name><?php echo $fname?></x:Name> 
			<x:WorksheetOptions> 
				<x:Print> 
					<x:ValidPrinterInfo /> 
				</x:Print> 
			</x:WorksheetOptions> 
		</x:ExcelWorksheet>                     
	</x:ExcelWorksheets>
</x:ExcelWorkbook>
</xml>
<![endif]-->
</head>
<body>
    <?php echo $content_for_layout; ?>
</body>
</html>